package org.codegallery.javagal.concurrent.cpj;

public abstract class JoinedPair extends Box {
	protected Box fst; // one of the boxes
	protected Box snd; // the other one

	protected JoinedPair(Box a, Box b) {
		fst = a;
		snd = b;
	}

	public synchronized void flip() { // swap fst/snd
		Box tmp = fst;
		fst = snd;
		snd = tmp;
	}

	// other internal helper methods
}


